﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GamePlugin.Logics.Core;
using WindowsInput;

namespace GamePlugin.Logics.Game.Actions
{
    public class DActionAuctionTryAuctionItem : MachineState
    {
        public override void Initialize()
        {
            this.AddState("Finished");
            this["Finished"].UpdateEvent += new EventHandler<GameTimeEventArgs>((o, e) => this.Finished(o, e));

            this.DefaultState = typeof(DActionAuctionReceiveItems).Name;
        }

        public void ReceiveItems(object o, GameTimeEventArgs e)
        {
            InputSimulator input = Workspace.Instance.DiabloPluginGame.InputSimulator;

            this.ChangeToState("Finished");
        }

        public void Finished(object o, GameTimeEventArgs e)
        {
            InputSimulator input = Workspace.Instance.DiabloPluginGame.InputSimulator;

            this.Owner.IsNeedReset = true;
        }
    }
}
